home *** CD-ROM | disk | FTP | other *** search
/ Aminet 20 / Aminet 20 (1997)(GTI - Schatztruhe)[!][Aug 1997].iso / Aminet / dev / src / DICE_SharedLib.lha / DMakefile < prev    next >
Makefile  |  1997-06-23  |  2KB  |  86 lines

  1. ##
  2. ##        Example Shared Library Code
  3. ##        Compiles with DICE
  4. ##        
  5. ##        By Wez Furlong <wez@twinklestar.demon.co.uk>
  6. ##
  7. ##        Based on code by Geert Uytterhoeven and Matt Dillon
  8. ##
  9. ##        This source was produced:    Monday 23-Jun-1997 
  10. ##
  11. ##        DISCLAIMER
  12. ##
  13. ##        Please read the code FULLY before use... I could have put ANYTHING in
  14. ##        here; I may have the code format your bootdrive for example.
  15. ##
  16. ##        NEVER trust example code without fully understanding what it does.
  17. ##
  18. ##        This code comes with no warranty; I am NOT responsible for any damage
  19. ##        that may ensue from its use, be it physical, mental or otherwise.
  20. ##
  21. ##        This code may be modified, so long as the names of myself, Geert and
  22. ##        Matt are mentioned within any release or distribution produced using it,
  23. ##        and a copy sent to myself.
  24. ##
  25. ##        This code may be redistributed freely; no profit is allowed to be made
  26. ##        from its distribution.
  27. ##
  28. ##        This code may be included on an Aminet or Fred Fish CD.
  29. ##
  30.  
  31. #### The name of the library
  32. PROJECT= example
  33.  
  34. ####    The names of your source modules
  35. ##    LibHeader should be first to prevent accidental execution
  36. SRCS= LibHeader.c Misc.c Memory.c StdLibFunc.c Functions.c 
  37. HDRS= $(PROJECT).h  
  38.  
  39. EXEDIR= distribution/
  40. OD= objects/
  41. CFLAGS= -3.0 -d0 -R -l0 -// -f0 
  42.  
  43. #### You shouldn't need to edit below here
  44. PROTOS= $(OD)$(PROJECT)-protos.h
  45. EXE= $(EXEDIR)$(PROJECT).library
  46. FD= $(PROJECT).fd
  47. LINKLIB= $(EXEDIR)$(PROJECT).lib
  48. PRAGMAS= $(EXEDIR)$(PROJECT)_pragmas.h
  49. COMPFLAGS = -no-env $(CFLAGS) $(OD:"*":-I*) -R0 -l0 -lc -lamiga30 -lautos -ms
  50.  
  51. OBJS= $(SRCS:"*.a":"$(OD)*.o") $(SRCS:"*.c":"$(OD)*.o")
  52.  
  53. all: $(PROTOS) $(LINKLIB) $(OD)$(PROJECT).library_rev.h $(PRAGMAS) $(EXE)
  54.  
  55. $(PROJECT).library_rev.h:    $(SRCS) $(HDRS)
  56.     uprev $(PROJECT).library `type $(PROJECT).library_rev.ver`
  57.     
  58. nopro: $(EXE)
  59.  
  60. $(EXE): $(OBJS)
  61.     fwrite $(OD)$(PROJECT).lnktmp $(OBJS)
  62.     dcc $(COMPFLAGS) @$(OD)$(PROJECT).lnktmp -o %(left)
  63.  
  64. $(OBJS) : $(SRCS)
  65.     dcc %(right) -o %(left) -c $(COMPFLAGS)
  66.  
  67. $(PROTOS) : $(SRCS)
  68.     -delete %(left)
  69.     makeproto -o %(left) %(right)
  70.  
  71. $(PRAGMAS) : $(FD)
  72.     fdtopragma $(FD) -o %(left)
  73.      -copy $(FD) $(EXEDIR)
  74.  
  75. $(LINKLIB) : $(FD)
  76.     fdtolib $(FD) -o %(left) -auto $(EXE)
  77.  
  78. clean:
  79.     -delete $(OBJS) $(PROTOS) $(PRAGMAS) $(LINKLIB) $(OD)$(PROJECT).lnktmp $(PROJECT).library_rev.h
  80.  
  81. relink: rmexe $(EXE)
  82.  
  83. rmexe:
  84.     -delete $(EXE)
  85.  
  86.